home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{B4178631-C6A8-11D1-89AB-08A604C10000}#1.0#0"; "NUMEDIT.OCX"
- Begin VB.Form Form1
- BorderStyle = 3 'Fixed Dialog
- Caption = "Numeric Edit Control Sample"
- ClientHeight = 3120
- ClientLeft = 45
- ClientTop = 345
- ClientWidth = 5475
- ClipControls = 0 'False
- Icon = "Form1.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3120
- ScaleWidth = 5475
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin NumEdit.NumericEdit NumericEdit1
- DataField = "Field1"
- DataSource = "Data1"
- Height = 315
- Left = 885
- TabIndex = 7
- Top = 1335
- Width = 1755
- _ExtentX = 3096
- _ExtentY = 556
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Text = "0"
- AllowEstimates = -1 'True
- Estimated = -1 'True
- CalculatorPicture= "Form1.frx":0442
- CalculatorButtonStyle= 1
- EstimatedSymbolForeColor= -2147483635
- BeginProperty EstimatedSymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Data Data1
- Align = 2 'Align Bottom
- Caption = "Data1"
- Connect = "Access"
- DatabaseName = "D:\Projects\PDSoftware\CONTROLS\NumEdit\Test\test.mdb"
- DefaultCursorType= 0 'DefaultCursor
- DefaultType = 2 'UseODBC
- Exclusive = 0 'False
- Height = 345
- Left = 0
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "Table1"
- Top = 2775
- Width = 5475
- End
- Begin VB.CommandButton Command1
- Caption = "&Close"
- Height = 360
- Left = 4260
- TabIndex = 4
- Top = 2295
- Width = 1110
- End
- Begin NumEdit.NumericEdit NumericEdit2
- DataField = "Field2"
- DataSource = "Data1"
- Height = 315
- Left = 885
- TabIndex = 8
- Top = 1785
- Width = 1755
- _ExtentX = 3096
- _ExtentY = 556
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Text = "0.00E+00"
- AllowEstimates = -1 'True
- Estimated = -1 'True
- Format = 5
- CalculatorPicture= "Form1.frx":1AD4
- BorderStyle = 0
- EstimatedSymbolForeColor= 255
- ButtonStyle = 2
- BeginProperty EstimatedSymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin NumEdit.NumericEdit NumericEdit3
- DataField = "Field3"
- DataSource = "Data1"
- Height = 315
- Left = 3615
- TabIndex = 9
- Top = 1335
- Width = 1755
- _ExtentX = 3096
- _ExtentY = 556
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Text = "
- 0.00"
- AllowEstimates = -1 'True
- Estimated = -1 'True
- EstimatedSymbol = "e"
- Format = 1
- CalculatorBackColor= -2147483626
- CalculatorPicture= "Form1.frx":3166
- CalculatorButtonStyle= 4
- CalculatorBorderStyle= 1
- BorderStyle = 1
- EstimatedSymbolForeColor= 32768
- ButtonBackColor = -2147483632
- ButtonStyle = 4
- ButtonForecolor = -2147483630
- ButtonHighlightColor= -2147483634
- BeginProperty EstimatedSymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin NumEdit.NumericEdit NumericEdit4
- DataField = "Field4"
- DataSource = "Data1"
- Height = 315
- Left = 3615
- TabIndex = 10
- Top = 1785
- Width = 1755
- _ExtentX = 3096
- _ExtentY = 556
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Text = "0.00%"
- AllowEstimates = -1 'True
- Format = 4
- CalculatorPicture= "Form1.frx":47F8
- CalculatorButtonStyle= 3
- BorderStyle = 1
- EstimatedSymbolForeColor= -2147483635
- ButtonStyle = 3
- BeginProperty EstimatedSymbolFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "&Scientific:"
- Height = 195
- Index = 3
- Left = 120
- TabIndex = 6
- Top = 1815
- Width = 690
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "&Percent:"
- Height = 195
- Index = 2
- Left = 2805
- TabIndex = 5
- Top = 1815
- Width = 600
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "&Currency:"
- Height = 195
- Index = 1
- Left = 2805
- TabIndex = 3
- Top = 1380
- Width = 675
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "&General:"
- Height = 195
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 1380
- Width = 600
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = $"Form1.frx":5E8A
- Height = 585
- Index = 1
- Left = 90
- TabIndex = 2
- Top = 555
- Width = 5490
- WordWrap = -1 'True
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "This sample program demonstrates some of the appearance and behaviour options for the Numeric Edit control."
- Height = 390
- Index = 0
- Left = 90
- TabIndex = 1
- Top = 90
- Width = 5490
- WordWrap = -1 'True
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Unload Me
- End Sub
- Private Sub Data1_Reposition()
- NumericEdit1.Estimated = Data1.Recordset.Fields("Estimate1").Value
- NumericEdit2.Estimated = Data1.Recordset.Fields("Estimate2").Value
- NumericEdit3.Estimated = Data1.Recordset.Fields("Estimate3").Value
- NumericEdit4.Estimated = Data1.Recordset.Fields("Estimate4").Value
- End Sub
- Private Sub Data1_Validate(Action As Integer, Save As Integer)
-
- Data1.UpdateRecord 'commit changes before starting edit
-
- Data1.Recordset.Edit
- Data1.Recordset.Fields("Estimate1").Value = NumericEdit1.Estimated
- Data1.Recordset.Fields("Estimate2").Value = NumericEdit2.Estimated
- Data1.Recordset.Fields("Estimate3").Value = NumericEdit3.Estimated
- Data1.Recordset.Fields("Estimate4").Value = NumericEdit4.Estimated
- Data1.Recordset.Update
- End Sub
-